<template>
  <div>
      {{ dname }}
        <el-button @click="back">返回上一层</el-button>    
      <div>
      <!-- 表格 -->
      <el-table
        ref="multipleTable"
        :data="bedList"
        tooltip-effect="dark"
        style="width: 70%; margin: 0px auto"
        @selection-change="handleSelectionChange"
      >
        <el-table-column
          prop="bnum"
          label="床位编号"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="hid"
          label="医院ID"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="did"
          label="科室ID"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="manufacturerAddress"
          label="制造商地址"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="manufacturerPhone"
          label="制造商电话"
          width="120"
        ></el-table-column>
        <el-table-column
          prop="status"
          label="床位状态"
          width="120"
        ></el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { bedDetailsByDid } from "@/api/bedDetailByDid.js";
export default {
    data(){
        return{
            did:0,
            dname:"",
            bedList:[]
        }
    },
    mounted(){
       this.did= this.$route.query.did;
       this.dname= this.$route.query.dname;
       this.bedDetailsByDids();
    },
    methods:{
        back(){
            this.$router.push("/Home/Department")
        },
        bedDetailsByDids(){
            bedDetailsByDid(this.did).then(res=>{
            if (res.data.code == 200) {
                this.bedList=res.data.data;
            }
        })
        }
       
    }
}
</script>

<style>

</style>